package com.example.test;

import com.example.test.DTO.LocationCondition;
import com.example.test.service.GetLocation;
import com.example.test.service.Updater;

import java.util.ArrayList;

public class MainClass {
    public static void main(String[] args) {
        testTextLang();
//        testAWS();
    }


    private static void testAWS() {
//        final String placeIndex = "explore.place.Grab";
//        final String placeIndex = "explore.place.Here";
        final String placeIndex = "Test_location_index";
        final String APIkey = "v1.public.eyJqdGkiOiIxNjU3Mjc2Zi0zMGQ2LTRkNjYtYjI2Ny05NzNkOThhNjFjMGIifabDO0-2A9UwMLiLiLw8p4XWDiT07l_6TsCz0WHG1R3V5g6bzV7u8ywGqH98x96zzR1B-YcnrAK2YfEsxppo2JckftQ3yYDSIKhzAIcPtGqlRflopWRvHIWtHyCqrdnZrNENH24B9YxNh32Q6TtC739jpAg4EjhJRlntGWwJEMJQFCohiEN05SlPC6Zjo_Jf7jMl242Oyl7s5RNBsFHegKVeDHdkwyFHS04f7FlPb65ZG38mV12qtRk__VtPZfLh30iOYy_01U4BkX8-TNo6R5eHQOZKl4aAaLHylQRjN5WaAFQ8B2XYeEA0bhwt5I-blyaBFV1sy1CKc0vANj_i5YM.MzRjYzZmZGUtZmY3NC00NDZiLWJiMTktNTc4YjUxYTFlOGZi";
        final String text = "72,insein road,kamaryut,near san yeik nyein bus stop, ကမာရွတ်, ရန်ကုန်";
        GetLocation gl = new GetLocation(placeIndex, APIkey);
        LocationCondition lc = new LocationCondition();

        ArrayList<Double> bp = new ArrayList<>();
        bp.add(-112.10);
        bp.add(46.32);

        ArrayList<String> fc = new ArrayList<>();
        fc.add("USA");
        fc.add("CHN");
        fc.add("MMA");
//        fc.add()

//        lc.setText("မိုန်မာရ် ");
        lc.setText("上海");
//        lc.setBiasPosition(bp);
        lc.setMaxResult(1);
//        lc.setLanguage("en");
//        lc.setFilterCountries(fc);

        System.out.println(gl.getLocation(lc));
    }

    private static void testTextLang() {
        Updater tmpTest = new Updater();
        tmpTest.funcTest(1, 200, tmpTest::getLocationTextMM);
//        tmpTest.funcTest(1, 2, tmpTest::getLocationTextEN);
//        tmpTest.funcTest(1, 2, tmpTest::getLocationTextCN);
//        System.out.println(receiver);
    }
}
//[[96.1295218, 16.8308141]]

//,
//95.994562,16.588168
// 96.369135,17.090022